import store from "@/store";
import dayjs from 'dayjs';
export const formItemStyle = {
  paddingLeft: "20px",
};

export const cellStyle = {
  background: "rgba(28, 155, 252, 0.02)",
  color: "rgb(142, 155, 185)",
  textAlign: "center",
};

// 表头单元格样式
export const headerCellStyle = {
  background: "rgba(28, 155, 252, 0.02)",
  color: "rgb(142, 155, 185)",
  textAlign: "center",
};
// 表格内表单子样式
export const tableFormStyle = {
  marginBottom: 0,
};
export const formBase = [];

console.log(store)
export const tableBase = [
  {
    label: "ID",
    prop: "id",
    width: 40
  },
  {
    label: "承运商名称",
    prop: "carrierName",
    operate: {
      type: "input",
      field: "carrierName",
    }
  },
  {
    label: "客户代码",
    prop: "customCode",
    operate: {
      type: "input",
      field: "customCode",
    },
  },
  {
    label: "未使用数量",
    prop: "notUsedNum",
    width: 150,
    operate: {
      type: "inputNumber",
      field: "notUsedNum",
    }
  },
  {
    label: "清关公司",
    prop: "customsCompanyId",
    width: 150,
    echo: {
      optionsKey: 'customsName',
      optionsValue: 'id',
      options: store.state.custom_dict.customCompany
    },
    operate: {
      type: "select",
      field: "customsCompanyId",
      optionsKey: 'customsName',
      optionsValue: 'id',
      options: store.state.custom_dict.customCompany
    }
  },
  {
    label: "目的地",
    prop: "destinationId",
    width: 150,
    echo: {
      optionsKey: 'destinationName',
      optionsValue: 'id',
      options: store.state.custom_dict.destination
    },
    operate: {
      type: "select",
      field: "destinationId",
      optionsKey: 'destinationName',
      optionsValue: 'id',
      options: store.state.custom_dict.destination
    }
  },
  {
    label: "快件查询地址",
    prop: "deliveryQueryAddr",
    width: 100,
    operate: {
      type: "input",
      field: "deliveryQueryAddr",
    }
  },
  {
    label: "寄件人",
    prop: "senderId",
    operate: {
      type: "input",
      field: "senderId"
    }
  },
  {
    label: "是否有效",
    prop: "isEffective",
    echo: {
      optionsKey: 'label',
      optionsValue: 'value',
      options: [{ label: '是', value: 0 }, { label: '是', value: 1 }]
    },
    operate: {
      type: "switch",
      field: "isEffective",
      activeValue: 0,
      inactiveValue: 1
    }
  },
  {
    label: "寄件电话",
    prop: "senderPhone",
    operate: {
      type: "input",
      field: "senderPhone",
    }
  },
  {
    label: "寄件地址",
    prop: "senderAddr",
    operate: {
      type: "input",
      field: "senderAddr",
    }
  },
  {
    label: "是否打子单",
    prop: "isPrint",
    echo: {
      optionsKey: 'label',
      optionsValue: 'value',
      options: [{ label: '是', value: 0 }, { label: '是', value: 1 }]
    },
    operate: {
      type: "switch",
      field: "isPrint",
      activeValue: 0,
      inactiveValue: 1
    }
  },
  {
    label: "寄件人城市",
    prop: "senderCityId",
    operate: {
      type: "input",
      field: "senderCityId",
    }
  },
  {
    label: "寄件人省份",
    prop: "senderProvinceId",
    operate: {
      type: "input",
      field: "senderProvinceId",
    }
  },
  {
    label: "邮编",
    prop: "zipCode",
    operate: {
      type: "input",
      field: "zipCode",
    }
  }
];
